package com.hopes.bizz.risk.applet.controller;

import com.hopes.bizz.risk.applet.service.AppletStatisticsService;
import com.hopes.bizz.risk.applet.statistics.vo.TaskCount;
import com.hopes.boss.common.core.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: ljh
 * @create: 2023/7/25
 * 小程序统计接口
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/appletStatistics")
@Tag(description = "appletStatistics", name = "小程序统计接口")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class AppletStatisticsController {

    private final AppletStatisticsService appletStatisticsService;


    /**
     * @return
     */
    @Operation(summary = "统计任务数", description = "统计任务数")
    @GetMapping("/statisticsTaskCount")
    public R statisticsTaskCount() {
        TaskCount taskCount = appletStatisticsService.statisticsTaskCount();
        return R.ok(taskCount);
    }
}
